AFC and Gradient Control

 

 

AFC

Animation Flow Curves (AFCs) are used by AfterBurn to animate many parameters over time from one value to another. By default, they are all disabled and need to be manually enabled to create an effect.

 

Sometimes you don't need to animate a parameter over the particle age, thus you won't need to use an AFC associated with it. However, many times it is advantageous to be able to animate the parameter, such as the Phase of the noise so that the volumetric effects move realistically. In such cases, you must right-click over the AFC icon to open the menu and switch it from the [Disable] state to [Enable]. The right-click menu also provides quick access to AFC options such as Copy, Paste and Reset. To enable AFC you can just click on it with left mouse button. This will also open AFC editor.

 

 

When enabled, the AFC icon will become colored as shown in the image below. On it's left is the icon for the Interpolation Controller.

 

 

When you left-click over an enabled AFC icon, the following Graph Editor will appear:

 

 

In the Graph Editor, the bottom left corner indicates the Low value for the chosen parameter, and the top right corner indicates the High value. The curve you define will be used to interpolate between these two values.

 

To refine the curve further, you can add keys simply by left-clicking on the curve. You can also animate each key over the entire 3ds max scene time. (Note: in 3ds max 4, the Animate button must be turned on. In 3ds max 5, you must turn on the Animate->Auto Key buttons.)

 

You can change the key type by right-clicking on the points as shown below. Be aware that when you click on a point, it turns white to indicate it is active.

 

 

 

 

When you do you get another pop-up where you can choose the type of curve you want applied to that point.

Smooth - Creates a smooth curve, which has automatic tangent adjustment.

Corner - Parts of the segment that are closer to the point will have linear characteristics.

Bezier - Enables you to adjust the handles, which represent the curve slope at the point location.

 

There's also a toolbar in the bottom right corner; its buttons are described below.

Copy - Allows you to copy all keys.

Paste - Lets you paste keys from any other AFC.

Delete - Removes all selected points.

Reset - Resets the layout.

 

 

Keyboard Shortcuts when over a curve point:

 

Shift + left mouse button drag - restricts the movement to X-axis

Ctrl + left mouse button drag - restricts the movement to Y-axis

right mouse button - Pops up a menu (smooth, corner, delete key)

 

 

Gradient

Gradients are used to change the specific colors over the particle age. Gradients are accessible by clicking the small icon located on the AfterBurn User Interface.

 

 

Some of the frequently used gradient options are accessible through the menu which is available by right-clicking the Gradient's icon as shown below.

 

 

Keyless mode - In this mode the Gradient will behave as a single color picker where the color is constant throughout the particle life.

Copy - Copy the selected gradient.

Paste - Paste a selected gradient.

Load - Load a previously saved gradient .AGT file.

Save - Saves the selected gradient to an .AGT file.

Reset - Clears all the keys and sets the Gradient's state to the default.

 

When you left-click on the small gradient icon within the AfterBurn dialog, a larger dialog box will appear.

 

 

The left edge of the gradient is equivalent to the particle's birth, while the right edge of the gradient is equivalent to the particle's death. The status line is located above the gradient and shows the ID number of the currently edited key, with its color and position expressed as the particle age. To get the best accuracy out of a particle age status line, you must manually adjust the particle life (the default is 100) in the AfterBurn Particles Property dialog box.

 

There are two types of the Gradient: Linear and TCB.

Linear - This gradient type uses the linear interpolation between the color keys.

TCB - Tension, Continuity, Bias, Ease To (eT) and Ease From (eF) parameters provide a lot more flexibility than the Linear gradient type. By using these parameters, you can change the influence of each color key on the color interpolation along the segment.

 

 

Gradient Usage

Left-click on gradient - After you release the button, a color key will be added at the selected place.

Double left-click on key - Opens the color picker.

Left-click + drag mouse on gradient - Doing this allows you to select multiple keys simultaneously.

Left-click on key + drag mouse - Moves the color key to the desired place.

Right-click on key - Opens the key menu as shown below. The options within this menu allow you to copy flag colors from one color key to another quickly as well as delete a key.

 

 

Right-click on gradient - Opens the gradient menu where you can also reset the entire gradient as well as copy, paste, load and save them.

 

 

 

AFC MXS

int GetMode()

Returns 0- disabled, 1- enabled
AFC.GetMode()

 

SetMode(mode)

mode = 0- disabled, 1- enabled
AFC.SetMode(mode)

 

Reset()

Removes all the keys
AFC.Reset()

 

Update(time)

Updates AFC in time (ticks) that is passed as a parameter
AFC.Update time

 

 

NumKnots()

Returns number of knots in AFC

AFC.NumKnots()

 

int GetKnotType index

return  type = 0 (KTYPE_AUTO), 1 (KTYPE_CORNER), 2 (KTYPE_BEZIER)
AFC.GetKnotType index

 

BOOL SetKnotType index type

index = 0... NumKnots()-1

type = 0 (KTYPE_AUTO),  1 (KTYPE_CORNER), 2 (KTYPE_BEZIER)
AFC.SetKnotType index type

 

Point2* GetKnot index

index = 0... NumKnots()-1
AFC.GetKnot index

int AddKnot [x,y] type

type = 0 (KTYPE_AUTO), 1 (KTYPE_CORNER), 2 (KTYPE_BEZIER)

return index of the knot that is added.
AFC.AddKnot [x,y] type

BOOL DeleteKnot index

index = 1... NumKnots()-2. First and last knots cannot be deleted

AFC.DeleteKnot index

 

Point2* GetInVec index

Returns Point2 handle vector
AFC.GetInVec index

 

BOOL SetInVec index [x,y]

Set handle vector

AFC.SetInVec index [x,y]

 

BOOL Load filename

AFC.Load "somefilename.afc"

 

BOOL Save filename

AFC.Save "somefilename.afc"

 

Copy()

AFC.Copy

 

BOOL Paste()

AFC.Paste

 

 

Gradient MXS

int GetMode()

Returns 0- keyless, 1- linear, 2- TCB
GRD.GetMode()

 

SetMode(mode)

mode = 0- keyless, 1- linear, 2- TCB
GRD.SetMode(mode)

 

Reset()

Removes all the keys
GRD.Reset()

 

Update(time)

Updates Gradient in time (ticks) that is passed as a parameter
Gradient.Update(time)

 

NumKeys()

Returns number of color keys in Gradient

GRD.NumKeys()

 

Color* GetKeyColor index

index = 0... NumKeys()-1
GRD.GetKeyColor index

float GetKeyPos index

index = 0... NumKeys()-1
GRD.GetKeyPos index

int AddKey x [r,g,b]

return index of the knot that is added.
GRD.AddKnot x [r,g,b] type

BOOL Deletekey index

index = 1... NumKeys()-2. First and last knots cannot be deleted

A GRD FC.DeleteKnot index

 

Point3* GetTCB index

Returns [T,C,B]. Works only for TCB graphs
GRD.GetTCB index

 

BOOL SetTCB index [t,c,b]

Set TCB. Works only for TCB graphs
GRD.SetTCB index [t,c,b]

 

BOOL Load filename

AFC.Load "somefilename.afc"

 

BOOL Save filename

AFC.Save "somefilename.afc"

 

Copy()

AFC.Copy

 

BOOL Paste()

AFC.Paste